import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
    {
        path: '/homeIndex',
        name: 'homeIndex',
        component: () => import('@/views/home/Index.vue')
    },
    {
        path: '/',
        redirect: '/homeIndex'
    },
    // 用户
    {
        path: '/userIndex',
        name: 'userIndex',
        component: () => import('@/views/user/Index.vue')
    },
    // 物品
    {
        path: '/goodsIndex',
        name: 'goodsIndex',
        component: () => import('@/views/goods/Index.vue')
    },

]

const router = createRouter({
    history: createWebHistory('/shoppingCart'),
    routes
})

export default router